' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2023.08.29.21.34]) on 2023.09.03 at 12:56 (Coordinated Universal Time)
' BAM port and mod by Charlie Veniot

' QBJS program by Vince
' https://qb64phoenix.com/forum/showthread.php?tid=1964&pid=19350#pid19350

dim w, h, ' pi 🟠 use BAM's _pi instead
' 🟠 pi = 4*atn(1)
w = 640
h = 480
screen _newimage(w, h, 32)
color _rgb(255,255,0) ' 🟠 added by Charlie
dim i, t, x, y
t = 0
do
    t = t+0.1
    cls
    for i=1 to 4
        for x=0 to w
            y = 100*sin(_pi*x/w)*sin(3*_pi*x/w + t + i*t*_pi*0.01)
            pset (x, h/2 - y)
        next
    next
    _delay 0.025
loop